/*  ----------------------------------------------------------------------------
 *  Arello Mobile
 *  Fast 3d Engine
 *  ----------------------------------------------------------------------------
 * Except where otherwise noted, this work is licensed under
 * http://creativecommons.org/licenses/by/3.0
 */

#include "Object.h"
#include "../Object.h"

namespace liba
{
namespace lib2d
{
namespace gui
{
namespace view
{

Object::Object( gui::Object * object )
:	object( object )
{}

void Object::render( hard::Renderer * rend )
{
	//rend->push_clip_rect( get_window_rect() );
	for( gui::Object::reverse_iterator it = object->children.rbegin(); it != object->children.rend(); ++it )
	{
		rend->push_shift_add( (*it)->get_window_rect().get_coord() );
		(*it)->get_view()->render( rend );
		rend->pop_shift();
	}
	//rend->pop_clip_rect();
}

} //namespace view
} //namespace gui
} //namespace lib2d
} //namespace liba

